package com.dragon.graduation.projectProgress.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.graduation.projectProgress.controller.dto.ProjectProgressSearchDTO;
import com.dragon.graduation.projectProgress.controller.vo.ProjectProgressVO;
import com.dragon.graduation.projectProgress.entity.ProjectProgressEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 毕设进度表 Mapper 接口
 * </p>
 *
 * @author dragon
 * @since 2025-02-28 21:20:30
 */
@Mapper
public interface ProjectProgressMapper extends BaseMapper<ProjectProgressEntity> {

    Page<ProjectProgressVO> selectPages(Page<ProjectProgressEntity> entityPage, @Param("searchDTO") ProjectProgressSearchDTO searchDTO);

    @Select("select * from db_project_progress where project_id = #{projectId} and student_id = #{studentId}")
    ProjectProgressEntity selectByProjectIdAndStudentId(@Param("projectId") Integer projectId, @Param("studentId") Integer studentId);
}
